/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hxg.portmgr.core.oper.snmp.oidgroup;

import hxg.portmgr.core.oper.snmp.param.Param;
import org.snmp4j.smi.OID;

/**
 *
 * @author hxg
 */
public enum IpAddressOID implements OidEntry,Param {

    IpAddr(new OID("1.3.6.1.2.1.4.20.1.1")) {

        @Override
        public String chsname() {
            return "IP地址";
        }

        @Override
        public RemoteValueType remoteValueType() {
            return RemoteValueType.StringValue;
        }
    },
    NetMask(new OID("1.3.6.1.2.1.4.20.1.3")) {

        @Override
        public String chsname() {
            return "IP掩码";
        }

        @Override
        public RemoteValueType remoteValueType() {
            return RemoteValueType.StringValue;
        }
    },
    IpAddrIfIndex(new OID("1.3.6.1.2.1.4.20.1.2")) {

        @Override
        public String chsname() {
            return "IP所在接口";
        }

        @Override
        public RemoteValueType remoteValueType() {
            return RemoteValueType.StringValue;
        }
    };

    private IpAddressOID(OID oid) {
        this.oid = oid;
    }
    final OID oid;

    @Override
    public OID getOID() {
        return oid;
    }

    @Override
    public String oidValue() {
        return oid.toString();
    }

    @Override
    public abstract String chsname();

    @Override
    public String unit() {
        return "";
    }

    @Override
    public abstract RemoteValueType remoteValueType();

    @Override
    public String toString() {
        return chsname();
    }

    @Override
    public OID getAppendOID(OID appendOid) {
        return (new OID(oid)).append(appendOid);
    }

    @Override
    public Param getParamType() {
        return this;
    }
    
}
